#ifndef RLROUND_H
#define RLROUND_H

class RouletteBet;

class RouletteRound
{
	public:
		RouletteRound(void);
		~RouletteRound(void);

		uint8 numMoneyBets();
		uint8 numBets();

		RouletteBet* getBet(uint8 betId);

		bool8	addBet(RouletteBet* bet);

		int32	totalBet(void);
		int32	totalInside(void);
		int32	totalOutside(void);

		int32 calcPayout(uint8 winningNumber);
		int32 calcTotalWinningBets(uint8 winningNumber);

		bool8 validate(
			int32 minInside, int32 maxInside,
			int32 minOutside, int32 maxOutside, int32 maxSingleInside);

        bool8 isValidAmountBet(void);

		enum PublicConstants { MAX_BETS = (227 + 1) };

	protected:
		uint8			m_numBets;
		uint8			m_winner;
		RouletteBet*	m_bets[MAX_BETS];
};

inline uint8
RouletteRound::numBets()
{
	return m_numBets;
}

inline RouletteBet *
RouletteRound::getBet(uint8 betID)
{
	if (betID >= 0 && betID < MAX_BETS)
		return m_bets[betID];
	else
		return (RouletteBet *)0;
}

#endif
